package com.example.demo.common.exception.enums;

import com.example.demo.common.exception.CommomMessage;

/**
 * @Name MessageEnum
 * @Description
 * @Author wen
 * @Date 2020-03-28
 */
public enum  MessageEnum implements CommomMessage {

    //基本类型
    SUCCESS(0, "操作成功"),
    FAIL(500, "操作失败"),

    USER_SESSION_NOT_EXITS(20001, "用户accessToken无效或者为空"),
    ;

    private int code;

    private String msg;

    MessageEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }



}
